﻿using Freshbox2._0.BLL;
using Freshbox2._0.MODEL;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PagedList;
using System.Linq.Expressions;
 

namespace Freshbox2._0.UI.Controllers
{
    public class ProductStaticController : BaseController<wares>
    {
        //
        // GET: /ProductStatic/pagelist
        protected admin CurrentUer
        {
            get { return Session["CurrentUer"] == null ? null : (admin)Session["CurrentUer"]; }
        }
        public override BLL.BaseBll<wares> bll
        {
            get
            {
                return new WaresBll();
            }

        }
        StoreHouseBll storeHouseBll = new StoreHouseBll();

        StoreBll storeBll = new StoreBll();

        WaresDetailsBll waresDeBll = new WaresDetailsBll();

        //waresCode  waresName waresPrice waresBid waresUnit waresSpec waresSum

        public class ListWaresAll
        {
            public string waresCode;
            public string waresName;
            public decimal? waresPrice;
            public decimal? waresBid;
            public string waresUnit;//单位
            public string waresSpec;//规格
            public int? waresSum;  //总数  

        }
        public class ShopNumWare
        {
            public string waresCode;

        }
        public int? waresquantityHouse;//仓库的数量
        public int? waresquantityStore;//店铺的数量

        /// <summary>
        /// 显示列表数据
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <param name="model"></param>
        /// <returns></returns>

        public ActionResult Get2(int page, int rows, wares model, string storeid, string areaid,string sort)
        {

            var waresHouseList = new List<ListWaresAll>();

            var orderByList = new List<ListWaresAll>();

            var WaresShopNumList = new List<ShopNumWare>();

            Expression<Func<wares, bool>> condition = x => x.validstatus == 1;

            if(model.waresCode==null&&model.waresName!=null)
            {
              condition = x => x.validstatus == 1&&x.waresName.Contains(model.waresName);
            }
            if (model.waresCode != null && model.waresName == null)
            {
                condition = x => x.validstatus == 1 && x.waresCode.Contains(model.waresCode);
            }
            if (model.waresCode != null && model.waresName != null)
            {
                condition = x => x.validstatus == 1 && x.waresCode.Contains(model.waresCode) && x.waresName.Contains(model.waresName);
            }

            //商品表 中的商品信息 model, x => true, true, x => x.waresCode, rows, page, out count
            var listWares = bll.Search(condition).Select(x => new { x.waresCode, x.waresName, x.waresPrice, x.waresBid, x.waresSpec, x.waresUnit, }).ToList();

            foreach (var itemWare in listWares)
            {              
                // 没有查询条件  默认显示所有     商品的数量是 库存中数量+各个店铺的数量
                if (storeid == "" && areaid == "")
                {
                    var listHouse = storeHouseBll.Search().Where(x => x.waresCode == itemWare.waresCode).ToList().Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = listHouse.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;
                    }
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                //如果是 按区域 查询 统计区域库存 
                if (storeid == "" && areaid != "")
                {
                    int AreaID = Convert.ToInt32(areaid);
                    var listHouse = storeHouseBll.Search().Where(x => x.waresCode == itemWare.waresCode && x.areaCode == AreaID).ToList().Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = listHouse.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;

                    }
                }
                //如果查询相关店铺  统计各个店铺的库存
                if (storeid != "" && areaid == "")

                {
                    int storeID = Convert.ToInt32(storeid);
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode && x.storeid == storeID).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                //如果查询 既输入了区域 又输入了店铺 就按店铺查询 因为现在只有一个区域
                if (storeid != "" && areaid != "")
                {
                    int storeID = Convert.ToInt32(storeid);
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode && x.storeid == storeID).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                ListWaresAll waresHouseModel = new ListWaresAll();
                waresHouseModel.waresCode = itemWare.waresCode;
                waresHouseModel.waresName = itemWare.waresName;
                waresHouseModel.waresPrice = itemWare.waresPrice;
                waresHouseModel.waresSpec = itemWare.waresSpec;
                waresHouseModel.waresUnit = itemWare.waresUnit;
                waresHouseModel.waresBid = itemWare.waresBid;
                if (storeid != "" && areaid == "")//只统计本店铺的数量
                {
                    waresHouseModel.waresSum = waresquantityStore;
                }
                if (storeid == "" && areaid == "")
                {
                    waresHouseModel.waresSum = waresquantityHouse;   //waresquantityStore + 
                }
                if (storeid == "" && areaid != "")
                {
                    waresHouseModel.waresSum = waresquantityHouse; 
                }
                //如果查询 既输入了区域 又输入了店铺 就按店铺查询 因为现在只有一个区域
                if (storeid != "" && areaid != "")
                {
                    waresHouseModel.waresSum = waresquantityStore;
                }
                waresHouseList.Add(waresHouseModel);

            }
            if (sort == "waresSum")
            {
                //这里运用新的nuget包 pagelist.mvc  然后再  using using PagedList; 》》》》  ToPagedList(page,rows)    

                orderByList = waresHouseList.OrderBy(x => x.waresSum).ToPagedList(page, rows).ToList();  //pageNum 页码数    pagesize  每页显示几条数据
            }

            return Json(new { total = waresHouseList.Count(), rows = orderByList });

        }



        //获取店铺列表
        public ActionResult GetShopName()
        {
            return Json(storeBll.Search(x=>x.storeStatus==1).Select(x => new { shopID = x.storeid, shopName = x.storeName }).ToList());
        }


        AreaBll areaBll = new AreaBll();

        //获取区域列表
        public ActionResult GetAreaName()
        {
            return Json(areaBll.Search().Select(x => new { AreaID = x.areaCode, AreaName = x.areaName }).ToList());
        }
        // 导出excel
        public ActionResult ExportExcel(string storeid, string areaid)
        {

            var waresHouseList = new List<ListWaresAll>();

            var WaresShopNumList = new List<ShopNumWare>();

            //商品表 中的商品信息
            var listWares = bll.Search().Select(x => new { x.waresCode, x.waresName, x.waresPrice, x.waresBid, x.waresSpec, x.waresUnit, }).ToList();
            foreach (var itemWare in listWares)
            {             
                // 没有查询条件  默认显示所有     商品的数量是 库存中数量+各个店铺的数量
                if (storeid == "" && areaid == "")
                {
                    var listHouse = storeHouseBll.Search().Where(x => x.waresCode == itemWare.waresCode).ToList().Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = listHouse.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;
                    }
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                //如果是 按区域 查询 统计区域库存 
                if (storeid == "" && areaid != "")
                {
                    int AreaID = Convert.ToInt32(areaid);
                    var listHouse = storeHouseBll.Search().Where(x => x.waresCode == itemWare.waresCode && x.areaCode == AreaID).ToList().Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = listHouse.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;

                    }
                }
                //如果查询相关店铺  统计各个店铺的库存
                if (storeid != "" && areaid == "")
                {
                    int storeID = Convert.ToInt32(storeid);
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode && x.storeid == storeID).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                //如果查询 既输入了区域 又输入了店铺 就按店铺查询 因为现在只有一个区域
                if (storeid != "" && areaid != "")
                {
                    int storeID = Convert.ToInt32(storeid);
                    var shopWareNumList = waresDeBll.Search(x => x.waresCode == itemWare.waresCode && x.storeid == storeID).GroupBy(x => x.waresCode).Select(x => new { waresquantity = x.Sum(y => y.waresquantity) }).ToList();
                    if (shopWareNumList.Count() != 0)
                    {
                        waresquantityStore = shopWareNumList.FirstOrDefault().waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                }
                ListWaresAll waresHouseModel = new ListWaresAll();
                waresHouseModel.waresCode = itemWare.waresCode;
                waresHouseModel.waresName = itemWare.waresName;
                waresHouseModel.waresPrice = itemWare.waresPrice;
                waresHouseModel.waresSpec = itemWare.waresSpec;
                waresHouseModel.waresUnit = itemWare.waresUnit;
                waresHouseModel.waresBid = itemWare.waresBid;
                if (storeid != "" && areaid == "")//只统计本店铺的数量
                {
                    waresHouseModel.waresSum = waresquantityStore;
                }
                if (storeid == "" && areaid == "")
                {
                    waresHouseModel.waresSum = waresquantityStore + waresquantityHouse;
                }
                if (storeid == "" && areaid != "")
                {
                    waresHouseModel.waresSum = waresquantityHouse;
                }
                //如果查询 既输入了区域 又输入了店铺 就按店铺查询 因为现在只有一个区域
                if (storeid != "" && areaid != "")
                {
                    waresHouseModel.waresSum = waresquantityStore;
                }
                waresHouseList.Add(waresHouseModel);

            }

            //  //创建一个工作簿
            NPOI.HSSF.UserModel.HSSFWorkbook book = new NPOI.HSSF.UserModel.HSSFWorkbook();
            //添加一个sheet     //创建一个页
            NPOI.SS.UserModel.ISheet sheet1 = book.CreateSheet("Sheet1");
            //设置单元格 的宽高
            sheet1.DefaultColumnWidth = 1 * 25;  //宽度
            sheet1.DefaultRowHeightInPoints = 25;  //高度
            //创建一行
            IRow row = sheet1.CreateRow(0);
            //创建一列
            ICell cell = row.CreateCell(0);
            ICellStyle cellStyle = book.CreateCellStyle();////创建样式对象
            IFont font = book.CreateFont(); //创建一个字体样式对象
            font.FontName = "方正舒体"; //和excel里面的字体对应
            font.FontHeightInPoints = 16;//字体大小
            font.Boldweight = short.MaxValue;//字体加粗
            cellStyle.SetFont(font); //将字体样式赋给样式对象
            //设置单元格的样式：水平对齐居中
            cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;//垂直对齐
            cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;//水平对齐  这两个在这里不起作用
            cell.CellStyle = cellStyle; //把样式赋给单元格   
            //给sheet1添加第一行的头部标题   //商品售价   商品进价 商品单位 商品规格 货架存放总数 商品预警值 当前货架商品数量  有效标志 
            NPOI.SS.UserModel.IRow row1 = sheet1.CreateRow(0);
            row1.CreateCell(0).SetCellValue("商品名称");
            row1.CreateCell(1).SetCellValue("商品售价");
            row1.CreateCell(2).SetCellValue("商品进价");
            row1.CreateCell(3).SetCellValue("商品单位");
            row1.CreateCell(4).SetCellValue("商品规格");
            row1.CreateCell(5).SetCellValue("当前货架商品数量 ");


            //将数据逐步写入sheet1各个行
            for (int i = 0; i < waresHouseList.Count; i++)
            {
                NPOI.SS.UserModel.IRow rowtemp = sheet1.CreateRow(i + 1);
                //创建单元格并设置它的值 ID

                rowtemp.CreateCell(0).SetCellValue(waresHouseList[i].waresName);
                rowtemp.CreateCell(1).SetCellValue(waresHouseList[i].waresPrice.ToString());
                rowtemp.CreateCell(2).SetCellValue(waresHouseList[i].waresBid.ToString());
                rowtemp.CreateCell(3).SetCellValue(waresHouseList[i].waresUnit);
                rowtemp.CreateCell(4).SetCellValue(waresHouseList[i].waresSpec);
                rowtemp.CreateCell(5).SetCellValue(waresHouseList[i].waresSum.ToString());
            }
            // 写入到客户端 
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            book.Write(ms);
            ms.Seek(0, SeekOrigin.Begin);
            string dataFile = DateTime.Now.ToLocalTime().ToString();
            string a = DateTime.Now.GetDateTimeFormats('g')[0].ToString();
            return File(ms, "application/vnd.ms-excel", dataFile + "商品统计.xls");

        }

       // 测试  统计新的商品
        public ActionResult GetTest(int page, int rows, storehouse model, string storeid, string areaid, string sort,string order)
        {
            int count=0;
            wares ware = new wares();
            var waresHouseList = new List<ListWaresAll>();

            var orderByList = new List<ListWaresAll>();

            var WaresShopNumList = new List<ShopNumWare>();
            var waresHouseList2 = new List<ListWaresAll>();
            Expression<Func<storehouse, bool>> condition = x => x.validstatus == 1;

            Expression<Func<waresdetails, bool>> condition1 = x => x.validstatus == 1;

            //默认情况下      
            if (storeid == "" && areaid == "")
            {
                //查询 仓库中的 商品Code   model, x => true, true, x => x.waresCode, rows, page, out count    Expression<Func<T, bool>> condition, bool isAsc, Expression<Func<T, S>> order, int pageSize, int pageIndex, out int count
               // var listWaresHouse = storeHouseBll.Search(condition, false, x => x.waresquantity, rows, page, out count).Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                var listHouse2 = bll.Search().Select(x => new { x.waresCode, x.waresName, x.waresSpec, x.waresUnit, x.waresBid, x.waresPrice, }).ToList();

                //List<wares> listHouse= listHouse2.ToArray();

                //wares myLocatedObject = listHouse2.Find(ware.waresCode).waresName; 

                var listWaresHouse = storeHouseBll.Search(condition).Select(x => new { x.waresCode, x.waresquantity,}).ToList();

                //遍历  仓库中的  商品Code   
                
                foreach (var itemWare in listWaresHouse)
                {
                    // 没有查询条件  默认显示仓库中的商品信息   
                    var listHouse = bll.Search().Where(x => x.waresCode == itemWare.waresCode).Select(x => new { x.waresCode, x.waresName, x.waresSpec, x.waresUnit, x.waresBid, x.waresPrice, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = itemWare.waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;
                    }
                    ListWaresAll waresHouseModel = new ListWaresAll();
                    waresHouseModel.waresCode = itemWare.waresCode;
                    waresHouseModel.waresName = listHouse.FirstOrDefault().waresName;
                    waresHouseModel.waresPrice = listHouse.FirstOrDefault().waresPrice;
                    waresHouseModel.waresSpec = listHouse.FirstOrDefault().waresSpec;
                    waresHouseModel.waresUnit = listHouse.FirstOrDefault().waresUnit;
                    waresHouseModel.waresBid = listHouse.FirstOrDefault().waresBid;
                    waresHouseModel.waresSum = waresquantityHouse;
                    waresHouseList.Add(waresHouseModel);
                }
                if (order == "asc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderBy(x => x.waresSum).ToPagedList(page, rows).ToList();
                }
                if (order == "desc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderByDescending(x => x.waresSum).ToPagedList(page, rows).ToList();
                }
                return Json(new { total = waresHouseList.Count(), rows = waresHouseList2 });

            }
            //如果是 按区域 查询 统计区域库存 
            if (storeid == "" && areaid != "")
            {
                //查询 仓库中的 商品Code   model, x => true, true, x => x.waresCode, rows, page, out count    Expression<Func<T, bool>> condition, bool isAsc, Expression<Func<T, S>> order, int pageSize, int pageIndex, out int count
                var listWaresHouse = storeHouseBll.Search(condition, false, x => x.waresquantity, rows, page, out count).Select(x => new { x.waresCode, x.waresquantity, }).ToList();
                //遍历  仓库中的  商品Code   
                foreach (var itemWare in listWaresHouse)
                {
                    // 没有查询条件  默认显示仓库中的商品信息    
                    var listHouse = bll.Search().Where(x => x.waresCode == itemWare.waresCode).Select(x => new { x.waresCode, x.waresName, x.waresSpec, x.waresUnit, x.waresBid, x.waresPrice, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityHouse = itemWare.waresquantity;
                    }
                    else
                    {
                        waresquantityHouse = 0;
                    }
                    ListWaresAll waresHouseModel = new ListWaresAll();
                    waresHouseModel.waresCode = itemWare.waresCode;
                    waresHouseModel.waresName = listHouse.FirstOrDefault().waresName;
                    waresHouseModel.waresPrice = listHouse.FirstOrDefault().waresPrice;
                    waresHouseModel.waresSpec = listHouse.FirstOrDefault().waresSpec;
                    waresHouseModel.waresUnit = listHouse.FirstOrDefault().waresUnit;
                    waresHouseModel.waresBid = listHouse.FirstOrDefault().waresBid;
                    waresHouseModel.waresSum = waresquantityHouse;
                    waresHouseList.Add(waresHouseModel);
                }
                if (order == "asc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderBy(x => x.waresSum).ToList();

                }
                if (order == "desc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderByDescending(x => x.waresSum).ToList();

                }
                return Json(new { total = waresHouseList.Count(), rows = waresHouseList2 });
            }
            //如果查询相关店铺  统计各个店铺的库存       
            if (storeid != "" && areaid == "")
            {
                int storeID = Convert.ToInt32(storeid);
                //condition 里面有 storeID   
                condition1 = x => x.validstatus == 1 && x.storeid == storeID;
                //该店铺的商品 code
                var shopWareNumList = waresDeBll.Search(condition1, false, x => x.waresquantity, rows, page, out count).Select(x => new { x.waresCode, x.waresquantity }).ToList();
                foreach (var itemShopWare in shopWareNumList)
                {
                    // 没有查询条件  默认显示仓库中的商品信息      
                    var listHouse = bll.Search().Where(x => x.waresCode == itemShopWare.waresCode).Select(x => new { x.waresCode, x.waresName, x.waresSpec, x.waresUnit, x.waresBid, x.waresPrice, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityStore = itemShopWare.waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                    ListWaresAll waresHouseModel = new ListWaresAll();
                    waresHouseModel.waresCode = itemShopWare.waresCode;
                    waresHouseModel.waresName = listHouse.FirstOrDefault().waresName;
                    waresHouseModel.waresPrice = listHouse.FirstOrDefault().waresPrice;
                    waresHouseModel.waresSpec = listHouse.FirstOrDefault().waresSpec;
                    waresHouseModel.waresUnit = listHouse.FirstOrDefault().waresUnit;
                    waresHouseModel.waresBid = listHouse.FirstOrDefault().waresBid;
                    waresHouseModel.waresSum = waresquantityStore;
                    waresHouseList.Add(waresHouseModel);
                }
                if (order == "asc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderBy(x => x.waresSum).ToList();

                }
                if (order == "desc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderByDescending(x => x.waresSum).ToList();

                }
                return Json(new { total = waresHouseList.Count(), rows = waresHouseList });
            }

            //如果查询 既输入了区域 又输入了店铺 就按店铺查询 因为现在只有一个区域
            if (storeid != "" && areaid != "")
            {

                int storeID = Convert.ToInt32(storeid);
                //condition 里面有 storeID   
                condition1 = x => x.validstatus == 1 && x.storeid == storeID;
                //该店铺的商品 code
                var shopWareNumList = waresDeBll.Search(condition1, false, x => x.waresquantity, rows, page, out count).Select(x => new { x.waresCode, x.waresquantity }).ToList();
                foreach (var itemShopWare in shopWareNumList)
                {
                    // 没有查询条件  默认显示仓库中的商品信息      
                    var listHouse = bll.Search().Where(x => x.waresCode == itemShopWare.waresCode).Select(x => new { x.waresCode, x.waresName, x.waresSpec, x.waresUnit, x.waresBid, x.waresPrice, }).ToList();
                    if (listHouse.Count() != 0)
                    {
                        waresquantityStore = itemShopWare.waresquantity;
                    }
                    else
                    {
                        waresquantityStore = 0;
                    }
                    ListWaresAll waresHouseModel = new ListWaresAll();
                    waresHouseModel.waresCode = itemShopWare.waresCode;
                    waresHouseModel.waresName = listHouse.FirstOrDefault().waresName;
                    waresHouseModel.waresPrice = listHouse.FirstOrDefault().waresPrice;
                    waresHouseModel.waresSpec = listHouse.FirstOrDefault().waresSpec;
                    waresHouseModel.waresUnit = listHouse.FirstOrDefault().waresUnit;
                    waresHouseModel.waresBid = listHouse.FirstOrDefault().waresBid;
                    waresHouseModel.waresSum = waresquantityStore;
                    waresHouseList.Add(waresHouseModel);
                }
                if (order == "asc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderBy(x => x.waresSum).ToList();

                }
                if (order == "desc" && sort == "waresSum")
                {
                    waresHouseList2 = waresHouseList.OrderByDescending(x => x.waresSum).ToList();

                }
                return Json(new { total = waresHouseList.Count, rows = waresHouseList2 });
            }
            return Json(new { total = waresHouseList.Count, rows = waresHouseList });// waresHouseList.Count() 
        }
    }
}
